08. Differentiate Between Models Exercise Solution

Differentiating Between Types of Models Exercise Solution

ND320 C2 L3 08 Differentiating Between Types Of Models Exercise Solution Video

Summary

First, I used Otsu’s method to extract background pixels from all of my images using a threshold intensity value of 50. This allowed me to look at the intensity distributions for breast tissue ONLY in fatty tissues or ONLY in dense tissue. I then used scipy.stats.mode to identify the mode (peak) of each type of tissue’s intensity distribution.

Here, fatty tissue had a peak at 140 and dense tissue had a peak at 176.

I then looped through all of the fatty/dense images and again using Otsu’s method with an intensity threshold of 50 to extract background. I then calculated how far each image’s peak was from the peaks of the fatty and dense tissue distributions. Finally, which difference is smaller determines what type of tissue my image most likely is.

Reflect

QUESTION:

Were there places where Otsu's method failed? Why do you think it failed?

ANSWER:

Otsu's method fails when the intensity distributions of the two classes can't be clearly separated.

Code

If you need a code on the https://github.com/udacity.